home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / Modules / mover.em < prev    next >
Lisp/Scheme  |  1992-10-06  |  1KB  |  36 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                                           ;;
  3. ;;  EuLisp Module                     Copyright (C) University of Bath 1991  ;;
  4. ;;                                                                           ;;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6.  
  7. (defmodule mover 
  8.   (streams driver arith lists list-operators extras futures threads others) ()
  9.  
  10.   (deflocal x 40)
  11.   (deflocal y 180)
  12.  
  13.   (deflocal dx 10)
  14.   (deflocal dy 5)
  15.  
  16.   (defun movit ()
  17.     (tilnil
  18.       (setq x (+ x dx))
  19.       (setq y (+ y dy))
  20.       (if (or (= x 20) (= x 480)) (setq dx (- dx)) nil)
  21.       (if (or (= y 20) (= y 480)) (setq dy (- dy)) nil)
  22.       (move X-stream 0 x y)
  23.       (move X-stream 1 (- 500 y) x)
  24.       (move X-stream 2 (- 500 x) (- 500 y))
  25.       (move X-stream 3 y (- 500 x))
  26.       t))
  27.  
  28.   (read-pixmap X-stream "bulb.xbm")
  29.  
  30.   (manage X-stream 0)
  31.   (manage X-stream 0)
  32.   (manage X-stream 0)
  33.   (manage X-stream 0)
  34.  
  35. )
  36.